class Solution {
public:
    vector<int> decimalRepresentation(int n) {

        vector<int> nums;

        int num = n, cnt = 0;

        while (num)
        {
            int k = num % 10;
            num /= 10;

            if (k > 0) {
                nums.push_back(k * pow(10, cnt));
            }
            cnt++;
        }

        reverse(nums.begin(), nums.end());

        return nums;

    }
};